package com.app.qbake.module.mine.activity;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;

import com.wind.base.BaseActivity;
import com.wind.base.utils.Navigator;
import com.app.qbake.R;
import com.app.qbake.module.mine.SoldGoodsTabFragment;
import com.app.qbake.module.mine.event.ShipmentEvent;

import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;

/**
 * Created by wind on 2018/10/20.
 */

public class SoldGoodsActivity extends BaseActivity {

    public static void start(Context context){
        Navigator.navigate(context,SoldGoodsActivity.class);
    }
    SoldGoodsTabFragment f;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EventBus.getDefault().register(this);
        setContentView(R.layout.fragment_container_with_toolbar);
        replaceFragment(f=new SoldGoodsTabFragment());
    }


    @Override
    protected void setTitle() {
        mTitleBar.setTitle("我卖出的");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        EventBus.getDefault().unregister(this);
    }
    @Subscribe
    public void onShipmentEvent(ShipmentEvent event){
        f.refresh();
    }
}
